Skip to content

feat: fall back to extension storage for proxy log directory#827

Merged
EhabY merged 4 commits intomainfrom
feat/proxy-log-fallback-storage
Mar 11, 2026
Merged

feat: fall back to extension storage for proxy log directory#827
EhabY merged 4 commits intomainfrom
feat/proxy-log-fallback-storage

Conversation

@EhabY
Copy link
Collaborator

@EhabY EhabY commented Mar 5, 2026

  • Fall back to extension global storage for the proxy log directory (getProxyLogPath) so logs are always written even when coder.proxyLogDirectory is not explicitly configured, removing the "No logs available" dead-end in the UI
  • Add CODER_SSH_LOG_DIR environment variable support as an intermediate fallback (setting > env var > extension storage)
  • Extract a shared resolveOverride helper in PathResolver that both getBinaryCachePath and getProxyLogPath use, ensuring consistent trim, tilde/${userHome} expansion, and normalization for all path overrides
  • Simplify commands.ts log viewer to always use the resolved log directory instead of branching on whether the setting is configured

Closes #824

@EhabY EhabY self-assigned this Mar 5, 2026
@EhabY EhabY force-pushed the feat/proxy-log-fallback-storage branch from e839d13 to c6b015e Compare March 9, 2026 10:24
EhabY added 4 commits March 11, 2026 15:00
When coder.proxyLogDirectory is not configured, use the extension's
global storage log path instead of discarding logs. This makes
troubleshooting easier without requiring manual configuration.
Covers configured path, empty/whitespace/unset fallback to default,
and tilde expansion.
…olution

Add CODER_SSH_LOG_DIR env var fallback for proxy log directory, apply
expandPath consistently to both settings and env vars in getBinaryCachePath
and getProxyLogPath, and inline the removed getLogPath method.
@EhabY EhabY force-pushed the feat/proxy-log-fallback-storage branch from f09cb1e to 52f2918 Compare March 11, 2026 12:00
@EhabY EhabY merged commit 837df11 into main Mar 11, 2026
6 checks passed
@EhabY EhabY deleted the feat/proxy-log-fallback-storage branch March 11, 2026 12:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Use the VS Code extension storage as a fallback when the proxyLogDirectory is not set

2 participants